package authentication

import (
	"MoSkeleton/framework/core/consts"
	"MoSkeleton/framework/core/dto/response"
	fu "MoSkeleton/framework/utils"
	"github.com/gin-gonic/gin"
)

/*
认证器，最终兜底的行为
*/
func doAuthCover(c *gin.Context) AuthFlowContinue {
	c.Set(consts.GinContext_AuthType_Key, consts.Request_Token_Type_None)
	response.ErrorTokenAuthFail(c)
	return true
}

func ifMatchPath(path string, matchPaths []string) bool {
	for _, noForcePath := range matchPaths {
		if fu.PathMatches(noForcePath, path) {
			return true
		}
	}
	return false
}
